import request from '@/service/lib/request';
import hiSetting from '@/hiSetting'

//获取订单数据
export function getOrder(appNo, appName, pageNo, pageSize) {
    return request({
        url: hiSetting.server + "/orderApi/find",
        method: 'get',
        params: { appNo, appName, pageNo, pageSize },

    });
}
//获取区app信息
export function getApp(app_name, app_type) {
    return request({
        url: hiSetting.server + "/applicationApi/getApp",
        method: 'get',
        params: { app_name, app_type },

    });
}
//获取通过app信息
export function getUserApp() {
    return request({
        url: hiSetting.server + "/userApi/getUserApp",
        method: 'get',
        // params: { userCode },
    });
}
//图片展示
export function getImg() {
    return request({
        url: hiSetting.server + "/applicationApi/getImg",
        method: 'get',
    });
}
//应用试用申请
export function addTrial(param) {
    return request({
        url: hiSetting.server + "/applicationApi/trial",
        method: 'post',
        data: param,
        transformRequest: [
            function (data) {
                let ret = ''
                for (let it in data) {
                    ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
                }
                ret = ret.substring(0, ret.lastIndexOf('&'));
                return ret
            }
        ],
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        }
    });
}

